{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/yzzc_sun/template/public/ygcss.css">
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">模板消息</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="invitative">
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                系统设置&nbsp;>&nbsp;模板消息
            </div>

            <div class="panel-body" id="order_show">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">预约成功模板消息：</label>
                    <div class="col-sm-9">
                        <p class="form-control-static">
                            <input type="text" name="tid1" value="{$item['order_template_id']}" id="open" class="form-control" />
                        </p>
                        <div style="color: #999;">*模板消息一旦设置，请勿在微信公众平台随意删除，将导致不可使用</div>
                    </div>
                </div>
            </div>

            <div class="panel-body" id="order_kong">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">预约成功模板消息：</label>
                    <div class="col-sm-9">
                        <a href="{php echo $this->createWebUrl('template', array('op'=>order))}">
                            <span class="btn btn-md storered">点击启用</span>
                        </a>
                    </div>
                </div>
            </div>

        <div class="form-group">
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$item['id']}"/>
            <input type="hidden" id="order_template_id" value="{$item['order_template_id']}"/>
        </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-12").show();
        $("#yframe-12").addClass("wyactive");
        var order=$('#order_template_id').val();
        if(order){
            $('#order_show').show();
            $('#order_kong').hide();
        }else{
            $('#order_kong').show();
            $('#order_show').hide();
        }
    })
</script>